#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
void swap(int* left, int* right)
{
	int tmp = *left;
	*left = *right;
	*right = tmp;
}
void swap(int& left, int& right)
{
	int tmp = left;
	left = right;
	right = tmp;

}
using namespace std;
int main()
{
	int a = 3;
	int b = 4;
	swap(&a, &b);
	cout << a << endl;
	cout << b << endl<<endl;
	swap(a, b);
	cout << a << endl;
	cout << b << endl;
	//int a = 4;
	//int b = a;
	//int& c = a;
	//cout << a << endl;
	//cout << b << endl;
	//cout << c << endl << endl;
	//b++;
	//cout << "b++" << endl;
	//cout << a << endl;
	//cout << b << endl;
	//cout << c << endl << endl;
	//a++;
	//cout << "a++" << endl;
	//cout << a << endl;
	//cout << b << endl;
	//cout << c << endl << endl;
	return 0;
}